package com.example.smartcity.logic.dao

import android.content.Context
import android.database.sqlite.SQLiteDatabase
import android.database.sqlite.SQLiteOpenHelper

/**
 *
 *  ANDROID STUDIO -version 2022.19
 *  项目名: SspDataSqlite
 *  创建时间: 2023/2/16 17:25
 *  CodeAuthor: ikun
 *  email: 2506789532@qq.com
 **/
class SspDataSqlite (
    val context: Context,
    name: String,
    version: Int
) : SQLiteOpenHelper(context, name, null, version) {


    // 建表
    private val ssp = "create table ssp( " +
            "id integer primary key autoincrement, " +
            "title text, " +
            "content text)"

    override fun onCreate(p0: SQLiteDatabase?) {
        // 执行sql语句
        p0?.execSQL(ssp)
    }

    override fun onUpgrade(p0: SQLiteDatabase?, p1: Int, p2: Int) {

    }

}
